package main

import (
	"fmt"
	"time"
	"runtime"
)

/**
 * @description 
 * @time 2018/5/12 16:08
 * @version


 */
func main() {

	var a [10] int
	for i := 0; i < 10; i++ {
		go func(ii int) {
			for{
				a[ii]++
				runtime.Gosched()
				//fmt.Printf("Hello from "+"goroutine %d\n",i)
			}
		}(i)
	}
	time.Sleep(time.Microsecond)
	fmt.Println(a)
}
